﻿<?xml version="1.0" encoding="utf-8" ?>
<log4net>
	<root>
		<level value="ALL" />
		<appender-ref ref="RollingFileAppender" />
		<appender-ref ref="ConsoleAppender" />
		<appender-ref ref="RichTextBoxAppender" />
	</root>

	<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
		<layout type="log4net.Layout.PatternLayout">
			<conversionPattern value="%date %level - %message%newline" />
		</layout>
	</appender>

	<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
		<file value="./logs/" />
		<rollingStyle value="Date" />
		<datePattern value="yyyyMMdd'.txt'"/>
		<staticLogFileName value="false" />
		<appendToFile value="true" />
		<maxSizeRollBackups value="50" />
		<maximumFileSize value="10MB" />
		<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
		<layout type="log4net.Layout.PatternLayout">
			<conversionPattern value="%date [%thread] %level - %message%newline%exception" />
		</layout>
		<filter type="log4net.Filter.LevelRangeFilter">
			<levelMin value="INFO" />
			<levelMax value="ERROR" />
			<levelMin value="DEBUG" />
		</filter>
	</appender>

	<appender name="RichTextBoxAppender" type="usbip_tunnel.RichTextBoxAppender">
		<formName value="LogForm"/>
		<textBoxName value="LogOutput"/>
		<layout type="log4net.Layout.PatternLayout">
			<conversionPattern value="%date %-5level - %message%newline" />
		</layout>
	</appender>	
</log4net>